#ifndef _RENZO_RESOURCE_
#define _RENZO_RESOURCE_

#include "RenzoMustHave.h"
namespace Renzo
{
class RENZODERER_API Resource
{
protected:
	/**
	In order to let every object spawn monitor by ResourceManager, the constructor of each object is hidden (marked private) and 
	a factory method new() is used to create an instance of Object. This factory method is also hidden and can only be called by ResourceManager. 
	After calling the factory method and before returning the object, ResourceManager records the pointer of the new object to its table.
	Because objects are created only by the ResourceManager, constructors of objects are left empty. Specific object parameters and data are passed 
	by calling object's initialize() method.
	*/	
	Resource(void);
	virtual ~Resource(void);
public:
	virtual void initialize() {}	

protected:
	void			setID(ResourceID id);
public:
	ResourceID		getID() const;
	const String&	getName() const;
	ObjectType		getType() const;
protected:
	ResourceID id;
	String name;
protected:	
	/**
	Register this object to the resource manager. Called when object is created.
	This function should be implemented by subclasses to differentiate the type of derived objects registered to the resource manager.
	*/	
	//void registerMe() = 0;
	/**
	Remove the registration of this object out of the resource manager. Called when object is deleted.
	*/
	//void unregisterMe() = 0;

	friend class ResourceManager;



/*
public:
	virtual String toString();
*/
};
}

#endif